Discover crontab format every 5 minutes, include the articles, news, trends, analysis and practical advice about crontab format every 5 minutes on alibabacloud.com
Cron mechanism
Cron allows the system to perform a specified work at a specified time, and we can use the CRONTAB directive to manage the cron mechanism
Crontab parameters
-U: This parameter allows us to edit other people's crontab, if not add this parameter, will open their own crontab
then enter a time table in good format in the file. After editing, save and exit. Enter $: crontab cronfile in the command line to submit the cronfile file to the c r o n process, a copy of the newly created cronfile has been stored in the/v a r/s p o l/c r o n Directory. the file name is the user name. Example: execute the command once every 0th minutes of ever
the output of the script to a temporary file.
Copy the Code code as follows:
*/5 * * * */usr/bin/curl-o temp.txt http://www.jb51.net/myscript.php
The following example uses the wget access URL to execute PHP scripts every 10 minutes. The-q option indicates quiet mode. "-O Temp.txt" indicates that the output is sent to a temporary file.
Copy the Code code as follows:
*/10 * * * */usr/bin/wget-q-o temp.txt
the day of a week. Program indicates the program to be executed. When f1 is *, the program is executed every minute. If f2 is *, the program is executed every hour, and so on, when f1 is a-B, it indicates that it will be executed from minute a to minute B, when f2 is a-B, it indicates that execution is performed from hour a to hour B, and when f1 is */n, it indicates that execution is performed every n minutes, if f2 is */n, the task is executed ever
executed if it equals 0Test indicates whether the decision was successful indicates that the previous test succeeds when it executesAddedecho $?Indicates whether the last command succeeded or failed, 0 indicates success, 1 indicates failure④ minutes Setting misuse"Run Two hours"The correct wording0 */2 * * * Date"Re-example"1-/2 * * * * COMMANDRepresents the 1th, 3, 5, 7, 9.....19
In addition to crontab, does linux have the command that runs automatically every x minutes-Linux general technology-Linux technology and application information? For details, refer to the following. [I = s] This post was last edited by dchwlinux
I am running wine thunder in ubuntu, and it is still okay, that is, the old crash. Fortunately, resumable upload can be performed. So I set it to automatically st
Basic Format:* *** CommandHour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.The first column indicates the hour 1 ~ 23 (0 indicates 0 points)The 3rd column indicates the date 1 ~ 31The 4th column indicates the month 1 ~ 12The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)6th columns of commands to run
Some examples of
. The preceding example of-23 ***/usr/local/etc/rc. d/lighttpd restart indicates that apache is restarted every 30 minutes from to every day. 0 23 ** 6/usr/local/etc/rc. d/lighttpd restart the preceding example indicates that apache is restarted at every Saturday. **/1 ***/usr/local/etc/rc. d/lighttpd restart apache * 23-7/1 */usr/local/etc/rc every hour. d/lighttpd restart: restart apache 0 11 4 * mon-wed/usr/local/etc/rc every hour from. d/lighttpd
Basic Format:* *** CommandHour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.The first column indicates the hour 1 ~ 23 (0 indicates 0 points)The 3rd column indicates the date 1 ~ 31The 4th column indicates the month 1 ~ 12The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)6th columns of commands to run
Some examples of
From: http://blog.csdn.net/ethanzhao/article/details/4406017
Basic Format:* *** CommandHour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.The first column indicates the hour 1 ~ 23 (0 indicates 0 points)The 3rd column indicates the date 1 ~ 31The 4th column indicates the month 1 ~ 12The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)6th colu
Basic Format:
* *** Command
Hour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.
The first column indicates the hour 1 ~ 23 (0 indicates 0 points)
The 3rd column indicates the date 1 ~ 31
The 4th column indicates the month 1 ~ 12
The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)
6th columns of commands to run
Some examples of
Format:* *** CommandHour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.The first column indicates the hour 1 ~ 23 (0 indicates 0 points)The 3rd column indicates the date 1 ~ 31The 4th column indicates the month 1 ~ 12The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)6th columns of commands to run
Some examples of
Linux crontab Command Format and example
Linux crontab Command Format and example
Run */5 * every five minutes ****
0 *** per hour ****
Execute 0 0 every day ***
Execute 0 0 every week ** 0
0 0 1 per month **
Execute 0 0 1 1 * eve
Crontab is a common timing function in linux. It can also be called the scheduled task function. Next I will introduce some formats and usage of crontab commands.
Crontab is a service that comes with a scheduled execution program in most Linux releases. You can use the crontab-e command to open a text editor to edit th
Crontab is a service that most Linux distributions bring with them a timed execution program. The CRONTAB-E command enables you to open a text editor to edit a timed task for the current user.
The specific format is as follows:
Name: crontab
Use Rights: All users
How to use:
c
a to the minute, and F2 is a-B to run from the first to the firstWhen F1 is */n, it is run every n minutes, F2 is */n for every n-hour interval, and the remainder of the analogyWhen F1 is a, B, C,... A, B, C,... Minutes to run, F2 A, B, C,... The time indicated that the first, B, c ... Hours to run, and the rest of the analogyThe user is also able to store all the settings in the file file, using
execute script within/etc/cron.monthly
The first four rows are variables that you can use to configure the Cron task runtime environment. The value of the shell variable tells the system which shell environment to use (in this case, the bash Shell), and the path variable defines the paths used to execute the command. The output of the cron task is mailed to the user name defined by the MAILTO variable. If the MAILTO variable is defined as a blank string (mailto= ""), the e-mail message
problem-free script on the command line;Solution: 1 , command use absolute path 2. Start your own definition of a dedicated PATH environment variable in the script Each job of the user cron consists of 2 parts Time minutes, hours, days , months , weeks . CommandBasic format:* * * * * commandTime-sharing Weekly commandThe 1th column represents minutes 1~59 p
of the hour, and the F2 is a-B indicating that it is executed from the first to the first, and the remainder of the analogyWhen F1 is */n, it is performed once every n minutes, and F2 is */n for every n-hour interval, with the remainder of the other analogyWhen F1 is a, B, C,... A, B, C,... Minutes to execute, F2 for a, B, C,... The time indicated that the first, B, c ... Hours to execute, and the rest of
the hour, and the F2 is a-B indicating that it is executed from the first to the first, and the remainder of the analogyWhen F1 is */n, it is performed once every n minutes, and F2 is */n for every n-hour interval, with the remainder of the other analogyWhen F1 is a, B, C,... A, B, C,... Minutes to execute, F2 for a, B, C,... The time indicated that the first, B, c ... Hours to execute, and the rest of the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.